package com.chinasoft.ms.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

// CarWithUserDTO.java
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CarWithUserDTO {
    private Long id;
    private Long carId;
    private Long userId;
    private String model;      // 车辆名称
    private String nickName;   // 用户昵称
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rentalStart;

    /**
     * 租赁结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rentalEnd;
    private Integer extensionCount;


    public CarWithUserDTO(Long id, Long carId, Long userId, Date rentalStart, Date rentalEnd, Integer extensionCount) {
        this.id = id;
        this.carId = carId;
        this.userId = userId;
        this.rentalStart = rentalStart;
        this.rentalEnd = rentalEnd;
        this.extensionCount = extensionCount;
    }
}
